﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Hkwl.WorldExpo.Merchant.Common;
using Hkwl.WorldExpo.Merchant.Model;
using Hkwl.WorldExpo.Merchant.Service;

namespace Hkwl.WorldExpo.Merchant.Web
{
    public partial class ShowMms : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(Request.QueryString["MmsId"]))
            {
                int mmsId = int.Parse(Request.QueryString["MmsId"]);
                NxMms nxMms = ServiceLocator.IProjectService.GetNxMmsById(mmsId);
                if (nxMms.MmsPic != null)
                {
                    if (nxMms.MmsPosition == 1)
                    {
                        this.lbMmsContent.Text = "<img src='" + nxMms.MmsPic + "' width='98%' height='98%' align='middle' /><br /><br /><span class='public_font12px' style='word-wrap:break-word;overflow:hidden;'>" + nxMms.MmsText + "</span>";
                    }
                    else
                    {
                        this.lbMmsContent.Text = "<span class='public_font12px' style='word-wrap:break-word;overflow:hidden;' alt='" + nxMms.MmsText + "'>" + nxMms.MmsText + "</span><br /><br /><img src='" + nxMms.MmsPic + "' width='98%' height='98%' align='middle' />";
                    }
                }
                else
                {
                    this.lbMmsContent.Text = "<span class='public_font12px' style='word-wrap:break-word;overflow:hidden;' alt='" + nxMms.MmsText + "'>" + nxMms.MmsText + "</span>";
                }
            }
        }
    }
}
